<?

# Include-File für Wetterdaten der Uni Münster

include_once("download.inc.php");
include_once("../wetter/simple_html_dom.php");

$string = download("https://www.fh-muenster.de","/fb4/wetterstation/index.php?p=0,2");
$html = str_get_html($string);
$explode = array();

$i=0;
// Finde die Wetter-Tabelle und alle Spalten
foreach($html->find('.box1') as $bukkdaten) {

	$i++;
    $explode[$i]   = $bukkdaten->innertext;
}
$explode[1]  = str_replace("<br>", " ",$explode[1]  );
$explode[1]  = str_replace("Uhr", "",$explode[1]  );

$explode[1] = strip_tags($explode[1] );

$item = explode( "<br>",$explode[5]);
//print_r($item);
//Fehlerbehandlung
$time_data = strtotime($explode[1]);
$time_now = strtotime(date('Y-m-d H:i'));
$diff = $time_now - $time_data;
//if ($diff > 3600) {
//    $error = true;
//} else {
//    $error = false;
//}
$item[0]  = str_replace("&nbsp;", " ",$item[0]  );

$item[0] = htmlentities(strip_tags($item[0]));
$bukkdaten = $item[0];

?>